function Common(){
	
	var common = {
		//测试
//		baseUrl: 'http://matchtest.isharplink.com/',
		//生产
		baseUrl: 'http://matchpcapi.isharplink.com/',
		
		getData: function(myurl,mydata,successCallback,errorCallback){
			$.ajax({
			    type: 'GET',
			    url: this.baseUrl + myurl,
			    data: mydata,
			    dataType: "json",
			    success: function(res){
			    	successCallback(res);
			    } ,
			    error: function(res){
			    	errorCallback(res);
			    }
			    
			});
			return;
		},
		jsonp:function(mydata,cb,successCallback,errorCallback){
			$.ajax({
			    type: 'GET',
			    url: 'https://sapadmin./webapi/News/helpcenter.html',
			    data: mydata ,
			    dataType: "json",
			    success: function(res){
			    	successCallback(res);
			    } ,
			    error: function(res){
			    	errorCallback(res);
			    }
			});
		},
		nowtime : function(t,type,type2){
			if(t==undefined)return;
			t = isNaN(t)?t:parseInt(t);
			var date = new Date(t);
			var res = "";
			if(type!=5){
				var hours = ("0" + date.getHours()).substr(-2);
				var minute = ("0" + date.getMinutes()).substr(-2);
				var second = ("0" + date.getSeconds()).substr(-2);
				res = (type2 == 2)?hours + ":" +minute:hours + ":" +minute + ":" + second;
			}else{
				var year = (date.getFullYear());
				var month = ("0" + (parseInt(date.getMonth())+1)).substr(-2);
				var day = ("0" + date.getDate()).substr(-2);
				res = year + "-" + month + "-" + day;
			}
			return res;
		},
		closeFoot: function(){
			var myurl = 'index/getBanner';
			var mydata = {
				banner_id: 2
			}
			this.getData(myurl,mydata,function(res){
				if(res.type == 1){
					$('.showThis').css('display','block');
				}else{
					$('.showThis').css('display','none');
				}
			},function(res){
				
			})
		},
		//导航模板
		myNav: '<a href="index.html" class="logo fl"></a>'+
		 				'<ul class="fr">'+
		 					'<li class="wzsy navacs">'+
		 						'<a class="mysy navBtns" href="index.html">'+
		 							'网站首页'+
		 						'</a>'+
		 					'</li>'+
		 					'<li class="rlgjqh navacs">'+
		 						'<a class="navBtns myrlgjqh" href="futures.html">'+
		 							'环球期指国际期货'+
		 						'</a>'+
		 					'</li>'+
		 					'<li class="ysp navhema">'+
		 						'<span class="navBtns navWidth1 bg_icon">'+
		 							'<span>环球期指衍生品</span>'+
		 							'<div class="actual">'+
		 								'<a class="navMoni navwh fl" href="derivatives_wh.html">'+
		 									'<p>外汇</p>'+
		 									'<p>60余种货币对200倍杠杆</p>'+
		 								'</a>'+
		 								'<a class="navMoni navgjs fl" href="derivatives_gjs.html">'+
		 									'<p>贵金属</p>'+
		 									'<p>低成本交易黄金白银铜等</p>'+
		 								'</a>'+
		 								'<a class="navMoni navny fl" href="derivatives_ny.html">'+
		 									'<p>能源</p>'+
		 									'<p>对冲交易并减少交易风险</p>'+
		 								'</a>'+
		 								'<a class="navMoni navcjhy fl" href="derivatives_cjhy.html">'+
		 									'<p>差价合约</p>'+
		 									'<p>包含美指、日经、欧洲优选等</p>'+
		 								'</a>'+
		 								'<div class="linefen1"></div>'+
		 								'<div class="linefen2"></div>'+
		 								'<div class="linefen3"></div>'+
		 							'</div>'+
		 						'</span>'+
		 					'</li>'+
		 					'<li class="kjzx navacs">'+
		 						'<a class="navBtns" href="special_line.html">'+
		 							'跨境专线'+
		 						'</a>'+
		 					'</li>'+
							'<li>'+
							'<a class="navBtns" target="_blank" href="http://live.dalucj.com">'+
							'掘金大讲坛'+
							'</a>'+
							'</li>'+
							'<li>'+
							'<a class="navBtns" target="_blank" href="http://yzxt.gdgccj.com">'+
							'VIP直播室'+
							'</a>'+
							'</li>'+
		 					'<li class="rjxz navacs">'+
		 						'<a class="navBtns" href="softLoad.html">'+
		 							'下载中心'+
		 						'</a>'+
		 					'</li>'+
		 					'<li class="ljwm navacs">'+
		 						'<span class="navBtns navWidth5 bg_icon">'+
		 							'<span>了解我们</span>'+
		 							'<div class="actual3">'+
		 								'<a class="navShipan navgywm fl" href="aboutUs.html">'+
		 									'<p>关于我们</p>'+
		 									'<p>全球知名金融衍生品服务商</p>'+
		 								'</a>'+
		 								'<a class="navMoni navlxwm fl" href="contactUs.html">'+
		 									'<p>联系我们</p>'+
		 									'<p>更多环球期指金融的联系方式</p>'+
		 								'</a>'+
		 								'<a class="navMoni navkfwx fl" href="javaScript:void(0)">'+
		 									'<p class="rlkf">微信客服</p>'+
		 									'<p>交易日24小时</p>'+
		 								'</a>'+
		 								'<a class="navMoni navkfdh fl" href="javaScript:void(0)">'+
		 									'<p class="rlkf">客服热线</p>'+
		 									'<p>交易日24小时</p>'+
		 								'</a>'+
		 								'<div class="linefen1"></div>'+
		 								'<div class="linefen2"></div>'+
		 								'<div class="linefen3"></div>'+
		 							'</div>'+
		 						'</span>'+
		 					'</li>'+
		 					'<li class="onlineBar">'+
		 						'<a class="navOpenAccount fl" target="_blank" href="http://reg./">'+
		 							'<p>期货业务</p>'+
		 							'<p>在线开户</p>'+
		 						'</a>'+
		 						'<div class="fl linelen"></div>'+
		 						'<a id="golden" class="navOpenAccount navopen fl" target="_blank" href="javaScript:void(0)">'+
		 							'<p>在线</p>'+
		 							'<p>出入金</p>'+
		 						'</a>'+
		 						'<div class="fl linelen"></div>'+
		 						'<a target="_blank" class="navOpenAccount navopenqt fl" target="_blank" href="http://trader.">'+
		 							'<p>其它衍生品业务</p>'+
		 							'<p>在线开户/出入金</p>'+
		 						'</a>'+
		 					'</li>'+
		 				'</ul>',
		//底部模板
		myfoot: '<p class="fl">Copyright © 2018 SHARP  LINK  DEVELOPMENTS  LIMITED</p>'+
				'<span class="fl showThis">.</span>'+
				'<a class="fl hotFoot showThis" target="_blank" href="https://match./#/">'+
					'<img src="/app/home/view/default/public/img/icon/hot.gif"/>'+
					'实盘大赛'+
				'</a>'+	
				'<span class="fl">.</span>'+
				'<a class="fl" target="_blank" href="http://reg./#/home">期货开户</a>'+
				'<span class="fl">.</span>'+
				'<a id="goldTemp" class="fl" target="_blank" href="javaScript:void(0)">线上出入金</a>'+
				'<span class="fl">.</span>'+
				'<a class="fl yspGlod" target="_blank" href="http://trader.">其它衍生品开户/出入金</a>'+
				'<span class="fl">.</span>'+
				'<a class="fl" href="aboutUs.html">关于</a>'+
				'<span class="fl">.</span>'+
				'<a class="fl" href="contactUs.html">联系</a>'+
				'<span class="fl">.</span>'+
				'<p class="fl">交易日24小时客户服务 400-668-9990</p>'+
				'<span class="fl">.</span>'+
				'<p class="fl">投资有风险 交易须谨慎</p>',
		
		golden: '<div class="goldWrap">'+
					'<a class="closeBtn" href="javaScript:void(0)">x</a>'+
					'<div class="goldContent">'+
						'<p class="goldTit">请选择出入金的交易端</p>'+
						'<div class="goldChoose">'+
							'<a target="_blank" href="http://taurus." id="rlzyb" class="fl acDiv">'+
								'<img src="/app/home/view/default/public/img/rlzyb.png"/>'+
								'<div>环球期指・行情交易系统</div>'+
							'</a>'+
							'<a target="_blank" href="http://keeper." id="xgj" class="fl acDiv xleft">'+
								'<img src="/app/home/view/default/public/img/xgjicons.png"/>'+
								'<div>环球期指・澎博信管家</div>'+
							'</a>'+
							'<a target="_blank" href="http://esunny./" id="ys" class="fl acDiv xleft">'+
								'<img src="/app/home/view/default/public/img/yishengImgs.png"/>'+
								'<div>环球期指・易盛极星</div>'+
							'</a>'+
						'</div>'+
					'</div>'+
				'</div>',
				
		goldControl: function(){
			$(".closeBtn").click(function(){
	        	$('.goldin').css('display','none');
//	        	$('#xinguanjia').css('display','none');
//	        	$('#ruilian').css('display','none');
//	        	$('#yisheng').css('display','none')
	        })
	        $('.goldChoose .acDiv').hover(function(){
	        	$(this).find('div').addClass('goldChooseAc');
	        },function(){
	        	$(this).find('div').removeClass('goldChooseAc');
	        })

	        
	        $("#golden").click(function(){
	//      	alert("即将开始，敬请期待!")
	//			$(".showtempTextWrap1").css("display","block");
	//			setTimeout(function(){
	//				$(".showtempTextWrap1").css("display","none");
	//			},1000)
				$(".goldin").css("display","block");
	        })
	        
	        $("#goldTemp").click(function(){
	        	$(".goldin").css("display","block");
	        })
	        
	        $('.closeTempGao').click(function(){
	        	$('.guanggao').css("display",'none')
	        	sessionStorage.setItem('openTemp',2);
	        })
		},
		navControl: function(dom){
//			$('.yspGlod').click(function(){
//				$('.showtempTextWrap').css('display','block');
//				setTimeout(function(){
//					$('.showtempTextWrap').css('display','none');
//				},1500)
//			})
//			$('.navopenqt').click(function(){
//				$('.showtempTextWrap').css('display','block');
//				setTimeout(function(){
//					$('.showtempTextWrap').css('display','none');
//				},1500)
//			})
			$('.'+dom).addClass('acNav')
			$('.navacs').click(function(){
				$('.navacs').removeClass('acNav');
				$(this).addClass('acNav');
			})
			
			$(".closeBtn").click(function(){
	        	$('.goldin').css('display','none');

	        })
	        $('.goldChoose .acDiv').hover(function(){
	        	$(this).find('a').addClass('goldChooseAc');
	        },function(){
	        	$(this).find('a').removeClass('goldChooseAc');
	        })
	        
	        $('.ysp').click(function(){
	        	window.location.href = 'derivatives.html';
	        })
	       
	        $("#golden").click(function(){
	//      	alert("即将开始，敬请期待!")
	//			$(".showtempTextWrap1").css("display","block");
	//			setTimeout(function(){
	//				$(".showtempTextWrap1").css("display","none");
	//			},1000)
				$(".goldin").css("display","block");
	        })
	        $("#goldTemp").click(function(){
	        	$(".goldin").css("display","block");
	        })
	        
	//      $(".hotimg").click(function(){
	////      	alert("即将开始，敬请期待!")
	//			$(".showtempTextWrap").css("display","block");
	//			setTimeout(function(){
	//				$(".showtempTextWrap").css("display","none");
	//			},1000)
	//      })
			
	        $('.nav ul a').hover(function(){
	        	$(this).stop().animate({fontSize:'14px'},150)
	        	$(this).addClass('NavOverAc');
	        },function(){
	        	$(this).stop().animate({fontSize:'12px'},150);
	        	$(this).removeClass('NavOverAc');
	        })
	        
	        $('.navWidth1').hover(function(){
	        	$(this).stop().animate({fontSize:'14px'},150)
	        	$(this).addClass('NavOverAc');
	        	$(".actual").css("display","block")
	        	$(this).addClass("bg_iconAc");
	        },function(){
	        	$(this).stop().animate({fontSize:'12px'},150);
	        	$(this).removeClass('NavOverAc');
	        	$(".actual").css("display","none");
	        	$(this).removeClass("bg_iconAc");
	        })
	        
	        $('.navWidth2').hover(function(){
	        	$(this).stop().animate({fontSize:'14px'},150)
	        	$(this).addClass('NavOverAc');
	        	$(".deal").css("display","block");
	        	$(this).addClass("bg_iconAc");
	        },function(){
	        	$(this).stop().animate({fontSize:'12px'},150);
	        	$(this).removeClass('NavOverAc');
	        	$(".deal").css("display","none")
	        	$(this).removeClass("bg_iconAc");
	        })
	        
	        $('.navWidth3').hover(function(){
	        	$(this).stop().animate({fontSize:'14px'},150)
	        	$(this).addClass('NavOverAc');
	        	$(".service").css("display","block");
	        	$(this).addClass("bg_iconAc");
	        },function(){
	        	$(this).stop().animate({fontSize:'12px'},150);
	        	$(this).removeClass('NavOverAc');
	        	$(".service").css("display","none");
	        	$(this).removeClass("bg_iconAc");
	        })
	        
	         $('.navWidth4').hover(function(){
	        	$(this).stop().animate({fontSize:'14px'},150)
	        	$(this).addClass('NavOverAc');
	        	$(".actual2").css("display","block");
	        	$(this).addClass("bg_iconAc");
	        },function(){
	        	$(this).stop().animate({fontSize:'12px'},150);
	        	$(this).removeClass('NavOverAc');
	        	$(".actual2").css("display","none");
	        	$(this).removeClass("bg_iconAc");
	        })
	         
	         $('.navWidth5').hover(function(){
	        	$(this).stop().animate({fontSize:'14px'},150)
	        	$(this).addClass('NavOverAc');
	        	$(".actual3").css("display","block");
	        	$(this).addClass("bg_iconAc");
	        },function(){
	        	$(this).stop().animate({fontSize:'12px'},150);
	        	$(this).removeClass('NavOverAc');
	        	$(".actual3").css("display","none");
	        	$(this).removeClass("bg_iconAc");
	        })
	        
	        $('.navCode').hover(function(){
	        	$(this).stop().animate({fontSize:'14px'},150)
	        	$(this).addClass('navLoadAc');
	        	$(".navDownload").css("display","block");
	        },function(){
	        	$(this).stop().animate({fontSize:'12px'},150);
	        	$(this).removeClass('navLoadAc');
	        	$(".navDownload").css("display","none");
	        })
	        
	        $('.navlanguage').hover(function(){
	        	$(this).stop().animate({fontSize:'14px'},150);
	        	$(this).addClass('NavOverAc');
	        	$(".languageWrap").css("display","block");
	        	$(this).addClass("bg_iconAc");
	        },function(){
	        	$(this).stop().animate({fontSize:'12px'},150);
	        	$(this).removeClass('NavOverAc');
	        	$(".languageWrap").css("display","none");
	        	$(this).removeClass("bg_iconAc");
	        })

	        $('.weixin').hover(function(){
	        	$(this).find('p').css('color','#efcb92');
	        	$('.tempWexin').css('display','block');
	        	$('.tempWexin img').animate({top:'0'});
	        },function(){
	        	$(this).find('p').css('color','#fff');
	        	var str = -($('.tempWexin').width()+5);
	        	$('.tempWexin img').animate({top:str},function(){
	        		$('.tempWexin').css('display','none');
	        	});
	        })
		}
			
	}
	
	return common;
}
